{include file="header.tpl"}
<p>你现在共有{$totalArticles}篇文章</p>

{if $flag}
<form method="get" action="{geturl action='edit'}">
    <div>
        <input type="submit" class="submit" value="编辑新文章"/>
    </div>
</form>
{/if}
<h2>{$date.y}年{$date.m}月</h2>
{if $articles|@count == 0}
<p>
    这个月没有文章发表。
</p>
{else}
    <dl>
        {foreach from=$articles item=article}
            {if $article->isLive()}
            <dt>
                {$article->dateline|date_format:'%d'}日： 
                        <a href="{geturl action='preview'}?id={$article->getId()}">
                            {$article->subject|escape}
                        </a>
            </dt>
            <dd>
                {$article->getTeaser(200)|escape}
            </dd>
            {/if}
        {/foreach}
    </dl>
{/if}
{include file="footer.tpl"}